package com.shao.intelligentsnake;

import javax.swing.*;

/**
 * @author shaohuailin
 * @date 2024/4/20
 */
public class App {
    public static void main(String[] args) {
        GameScene scene = new GameScene();
        // 设置表格大小为偶数，奇数暂未兼容。数字不易过大。
        // scene.getParams().setSize(16);

        JFrame frame = new JFrame();
        frame.setVisible(true);
        frame.setTitle("贪吃蛇");
        frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        frame.setSize(320, 320);
        frame.setLocation(20, 40);
        frame.add(scene);
        frame.addKeyListener(scene);
    }
}
